package com.resjz.milddog.service.user.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.resjz.milddog.dao.user.UserDao;
import com.resjz.milddog.entity.user.UserEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import com.resjz.milddog.service.user.userService;
@Service("userService")
@Slf4j
public class userServiceImpl extends ServiceImpl<UserDao, UserEntity> implements userService{
    /*@DubboReference(version = "${dubbo.service.version}",check = false)
    private OrderInterface orderInterface;*/
    @Override
    public UserEntity getuserByUserId(Long userId) {
        /*try {
            Thread.sleep(1000*2);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }*/
        return this.getById(userId);
    }
    /*@GlobalTransactional
    @Override
    public void savaUser(userVo userVo) {
        UserEntity userEntity = new UserEntity();
        BeanUtil.copyProperties(userVo,userEntity);
        this.save(userEntity);
        System.out.println("1111111111111111111111111");
        OrderVo orderVo = new OrderVo();
        orderVo.setUserId(userEntity.getUserId());
        orderVo.setOrderName("我看是件大事");
        orderInterface.saveOrder(orderVo);
    }

    @Override
    public OrderVo getOrderById(Long OrderId) {
        log.debug("333333333322222222222");
        return orderInterface.getOrderById(OrderId);
    }*/
}
